//
//  WCExtractDate.m
//  WebClipper
//
//  Created by Daniel Braun on 15/03/07.
//  Copyright 2007 Daniel Braun http://page-appart.net, http://braun.daniel.free.fr All rights reserved.
//

#import "WCExtractDate.h"
#import "CalendarRange.h"

@implementation WCExtractDate

+ (NSString *) description
{
	return @"convert to date";
}



- (id) initWithCoder:(NSCoder *) coder
{
	self=[super initWithCoder:coder];
	if ([coder allowsKeyedCoding]) {
	}
	return self;
}

- (void)encodeWithCoder:(NSCoder *)coder
{
	[super encodeWithCoder:coder];
	if ( [coder allowsKeyedCoding] ) {
	}
}

- (id) handle:(DOMHTMLElement *)el fromUrl:(NSURL *)url
{
	// convert to text, this is what super do
	CalendarRange *s=[super handle:el fromUrl:url];
	if (!s) return nil;
	NSAssert([s isKindOfClass:[CalendarRange class]], @"should be CalendarRange");
	return [s date2];
}

@end
